package com.hkh.erp.hr.bean.vacation.enums;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;

/**
 * 假期类型
 * @author huangkh
 */
public enum LeaveType {

    ANNUAL(1,"年假"),

    SICK(2,"病假"),

    PERSONAL(3,"事假"),

    MATERNITY(4,"产假"),

    NURSING(5,"护理假"),

    MARRIAGE(6,"婚假"),

    BEREAVEMENT(7,"丧假");


    LeaveType(int value, String type) {

    }

    @JsonCreator
    public static LeaveType fromValue(int value) {
        return values()[value];
    }

    @JsonValue
    public String toValue() {
        return String.valueOf(this.ordinal());
    }
}
